package com.example.multidatasource.db2.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 
 */
public class DocShare implements Serializable {
    /**
     * 主键
     */
    private String id;

    /**
     * 文件id
     */
    private String fileId;

    /**
     * 文件名
     */
    private String name;

    /**
     * 文件类型 （0文件夹 1文件）
     */
    private Byte type;

    /**
     * 文件扩展名
     */
    private String ext;

    /**
     * 文件大小（单位字节）
     */
    private Long size;

    /**
     * 文件服务器路径
     */
    private String path;

    /**
     * 父级id
     */
    private String parentId;

    /**
     * 所有父级id","分割
     */
    private String parentIds;

    /**
     * 层次级别 从1开始
     */
    private Integer treeLevel;

    /**
     * 全节点名
     */
    private String treeNames;

    /**
     * 对应的公共文件id
     */
    private String pubFileId;

    /**
     * 被分享的人
     */
    private String userId;

    /**
     * 共享父级路径
     */
    private String pubParentId;

    /**
     * 学校id
     */
    private String schoolId;

    /**
     * 分享状态（0待审核 1已分享 2未分享[自己取消] 21未分享[管理员取消分享] 3审核失败 4删除）
     */
    private Byte shareStatus;

    /**
     * 创建时间
     */
    private Date createAt;

    /**
     * 创建人
     */
    private String createBy;

    /**
     * 更新时间
     */
    private Date updateAt;

    /**
     * 更新人
     */
    private String updateBy;

    private static final long serialVersionUID = 1L;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getFileId() {
        return fileId;
    }

    public void setFileId(String fileId) {
        this.fileId = fileId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Byte getType() {
        return type;
    }

    public void setType(Byte type) {
        this.type = type;
    }

    public String getExt() {
        return ext;
    }

    public void setExt(String ext) {
        this.ext = ext;
    }

    public Long getSize() {
        return size;
    }

    public void setSize(Long size) {
        this.size = size;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getParentIds() {
        return parentIds;
    }

    public void setParentIds(String parentIds) {
        this.parentIds = parentIds;
    }

    public Integer getTreeLevel() {
        return treeLevel;
    }

    public void setTreeLevel(Integer treeLevel) {
        this.treeLevel = treeLevel;
    }

    public String getTreeNames() {
        return treeNames;
    }

    public void setTreeNames(String treeNames) {
        this.treeNames = treeNames;
    }

    public String getPubFileId() {
        return pubFileId;
    }

    public void setPubFileId(String pubFileId) {
        this.pubFileId = pubFileId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getPubParentId() {
        return pubParentId;
    }

    public void setPubParentId(String pubParentId) {
        this.pubParentId = pubParentId;
    }

    public String getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(String schoolId) {
        this.schoolId = schoolId;
    }

    public Byte getShareStatus() {
        return shareStatus;
    }

    public void setShareStatus(Byte shareStatus) {
        this.shareStatus = shareStatus;
    }

    public Date getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Date createAt) {
        this.createAt = createAt;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getUpdateAt() {
        return updateAt;
    }

    public void setUpdateAt(Date updateAt) {
        this.updateAt = updateAt;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DocShare other = (DocShare) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getFileId() == null ? other.getFileId() == null : this.getFileId().equals(other.getFileId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getExt() == null ? other.getExt() == null : this.getExt().equals(other.getExt()))
            && (this.getSize() == null ? other.getSize() == null : this.getSize().equals(other.getSize()))
            && (this.getPath() == null ? other.getPath() == null : this.getPath().equals(other.getPath()))
            && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
            && (this.getParentIds() == null ? other.getParentIds() == null : this.getParentIds().equals(other.getParentIds()))
            && (this.getTreeLevel() == null ? other.getTreeLevel() == null : this.getTreeLevel().equals(other.getTreeLevel()))
            && (this.getTreeNames() == null ? other.getTreeNames() == null : this.getTreeNames().equals(other.getTreeNames()))
            && (this.getPubFileId() == null ? other.getPubFileId() == null : this.getPubFileId().equals(other.getPubFileId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getPubParentId() == null ? other.getPubParentId() == null : this.getPubParentId().equals(other.getPubParentId()))
            && (this.getSchoolId() == null ? other.getSchoolId() == null : this.getSchoolId().equals(other.getSchoolId()))
            && (this.getShareStatus() == null ? other.getShareStatus() == null : this.getShareStatus().equals(other.getShareStatus()))
            && (this.getCreateAt() == null ? other.getCreateAt() == null : this.getCreateAt().equals(other.getCreateAt()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getUpdateAt() == null ? other.getUpdateAt() == null : this.getUpdateAt().equals(other.getUpdateAt()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getFileId() == null) ? 0 : getFileId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getExt() == null) ? 0 : getExt().hashCode());
        result = prime * result + ((getSize() == null) ? 0 : getSize().hashCode());
        result = prime * result + ((getPath() == null) ? 0 : getPath().hashCode());
        result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
        result = prime * result + ((getParentIds() == null) ? 0 : getParentIds().hashCode());
        result = prime * result + ((getTreeLevel() == null) ? 0 : getTreeLevel().hashCode());
        result = prime * result + ((getTreeNames() == null) ? 0 : getTreeNames().hashCode());
        result = prime * result + ((getPubFileId() == null) ? 0 : getPubFileId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getPubParentId() == null) ? 0 : getPubParentId().hashCode());
        result = prime * result + ((getSchoolId() == null) ? 0 : getSchoolId().hashCode());
        result = prime * result + ((getShareStatus() == null) ? 0 : getShareStatus().hashCode());
        result = prime * result + ((getCreateAt() == null) ? 0 : getCreateAt().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getUpdateAt() == null) ? 0 : getUpdateAt().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", fileId=").append(fileId);
        sb.append(", name=").append(name);
        sb.append(", type=").append(type);
        sb.append(", ext=").append(ext);
        sb.append(", size=").append(size);
        sb.append(", path=").append(path);
        sb.append(", parentId=").append(parentId);
        sb.append(", parentIds=").append(parentIds);
        sb.append(", treeLevel=").append(treeLevel);
        sb.append(", treeNames=").append(treeNames);
        sb.append(", pubFileId=").append(pubFileId);
        sb.append(", userId=").append(userId);
        sb.append(", pubParentId=").append(pubParentId);
        sb.append(", schoolId=").append(schoolId);
        sb.append(", shareStatus=").append(shareStatus);
        sb.append(", createAt=").append(createAt);
        sb.append(", createBy=").append(createBy);
        sb.append(", updateAt=").append(updateAt);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}